package com.pro.springboot.interfacep;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.pro.springboot.model.YtVerdictLostModel;

@Repository("ytVerdictLostInterface")
public interface YtVerdictLostInterface extends JpaRepository<YtVerdictLostModel, Long> {
	
	//查询所有
//	@Query(value="select * from yt_verdict_lost_copy where state=?1 " ,nativeQuery = true)
//	public List<YtVerdictLostModel> selectByCustomSqlTest1(String state);
//	
	//分页查询  传入参数
//	@Query(value="select * from yt_verdict_lost_copy where state=0 limit ?2,?3" ,nativeQuery = true)
//	public List<YtVerdictLostModel> selectByCustomSqlTestPage(String state,Integer startNum,Integer countNum);
//	
	//分页查询
	public Page<YtVerdictLostModel> findAll(Pageable pageable);
	
	//查询所有其他
//	@Query(value="from YtVerdictLostModel where state=?1 " )
//	public List<YtVerdictLostModel> selectByCustomSqlTest2(String state);
//	
	
	// 根据id获取对应失信被执行人
	//public YtVerdictLostModel finfByIdIs(Long id);
	// 根据名称查询失信被执行人列表
	public  List<YtVerdictLostModel> findByCompanyNameLike(String companyName);
	
	// //精确匹配username的用户对象
	//public YtVerdictLostModel getByCreditCodeIs(String creditCode);

}
